<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>政策法规管理</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="/lib/editormd/css/editormd.min.css">
    <link rel="stylesheet" href="/css/me.css">
    <link rel="stylesheet" href="/css/index.css">
</head>
<body>

<!--最上面的一层-->
<nav class="ui inverted attached segment m-padded-tb-mini m-shadow-small" >
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">管理后台</h2>
            <a href="#" th:href="@{/admin/getUsershow}"  class=" m-item item m-mobile-hide"><i class=" tags icon"></i>用户管理</a>
            <!--            默认获取的方式为get-->
            <a href="#"  th:href="@{/admin/getLawsList}" class="active m-item item m-mobile-hide"><i class="home icon"></i>政策法规管理</a>
            <a href="#" th:href="@{/admin/getBasicshow}" class="m-item item m-mobile-hide"><i class=" tags icon"></i>基层公开管理</a>
            <a href="#"  th:href="@{/admin/getSupList}" class="m-item item m-mobile-hide"><i class=" tags icon"></i>监督管理</a>
            <a href="#" th:href="@{/admin/getConList}" class="m-item item m-mobile-hide"><i class=" tags icon"></i>沟通互助管理</a>



            <div class="right m-item m-mobile-hide menu">
                <div class="ui dropdown  item">
                    <div class="text">
                        <img class="ui avatar image" src="https://unsplash.it/100/100?image=1005" th:src="@{${session.user.avatar}}">
                        <!--                        这里的图片也是从session中取出来的-->
                        <span th:text="${session.user.nickname}">张三</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <!--                        注意：使用的_fragments中的这一部分，其实th可以不要的-->
                        <a href="#"  th:href="@{/admin/logout}"  class="item">注销</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<div class="ui attached pointing menu">
    <div class="ui container">
        <div class="right menu">
            <a href="#"  th:href="@{/admin/getLawsList/add}" class=" item">新增</a>
            <a href="#" th:href="@{/admin/getLawsList}" class="teal active item">列表</a>
        </div>
    </div>
</div>

<!--中间内容-->
<div  class="m-container-small m-padded-tb-big">
    <div class="ui container">
        <div id="table-container">
            <table  class="ui compact celled teal table">
                <thead>
                <tr >
                    <th></th>
                    <th>分类</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                    <th>文本编号</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <!--                从model中取出pageInfo遍历-->
                <tr th:each="Laws, itemStat : ${pageInfo.list}">
                    <td th:text="${itemStat.count}">1</td>
                    <td th:text="${Laws.type_id}">你猜</td>
                    <td th:text="${Laws.create_time}">不知道</td>
                    <td th:text="${Laws.update_time}">不知道</td>
                    <td th:text="${Laws.text_number}">不知道</td>
                    <td>
                        <a href="#"  th:href="@{/admin/lawsShow/{id}/show(id=${Laws.id})}"  class="ui mini teal basic button">打开</a>
                        <a href="#"  th:href="@{/admin/lawsUpdate/{id}/update(id=${Laws.id})}"  class="ui mini teal basic button">编辑</a>
                        <a href="#"  th:href="@{/admin/lawsDelete/{id}/delete(id=${Laws.id})}" class="ui mini red basic button">删除</a>
                    </td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <th colspan="7">
                        <div class="ui mini pagination menu"  >
                            <div class="item"><a th:href="@{/admin/getLawsList}">首页</a></div>
                            <div class="item"><a th:href="@{/admin/getLawsList(pagenum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a></div>
                            <div class="item"><a th:href="@{/admin/getLawsList(pagenum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a></div>
                            <div class="item"><a th:href="@{/admin/getLawsList(pagenum=${pageInfo.pages})}">尾页</a></div>
                        </div>
                        <a href="#" th:href="@{/admin/getLawsList/add}"  class="ui mini right floated teal basic button">新增</a>
                    </th>
                </tr>
                </tfoot>
            </table>

            <div class="ui segment m-inline-block">
                <p >当前第<span th:text="${pageInfo.pageNum}"></span>页，总<span th:text="${pageInfo.pages}"></span>页，共<span th:text="${pageInfo.total}"></span>条记录</p>
            </div>

            <!--            判断是否为空，如果controller不放数据，就会显示-->
            <div class="ui success message" th:unless="${#strings.isEmpty(msg)}">
                <i class="close icon"></i>
                <div class="header">提示：</div>
                <p th:text="${msg}">恭喜，操作成功！</p>
            </div>

        </div>

    </div>
</div>
<!--中间部分-->
<div id="foot">
    <div id="service">
        <i class="layui-icon layui-icon-app"style=";font-size: 20px;"></i>
        其它服务
    </div>

    <div id="ser">

        <div class="a"><a href="http://cdbpw.chengdu.gov.cn/cdslyj/c110445/xw_list.shtml">城镇绿化</a></div>
        <div class="a"><a href="http://cdagri.chengdu.gov.cn/nyxx/c109521/cdnyxx_list.shtml">农业科技服务在线</a></div>
        <div class="a"><a href="http://cdagri.chengdu.gov.cn/nyxx/c109503/cdnyxx_list1.shtml">三农热线</a></div>
        <div class="a"><a href="http://cdagri.chengdu.gov.cn/nyxx/c109561/cdnyxx_pic.shtml">乡村旅游</a></div>
        <div class="a"><a href="http://cdgaj.chengdu.gov.cn/cdsgaj/jmhd/jmhd1615379690374.shtml">警民互动</a></div>
        <div class="a"><a href="http://cdfao.chengdu.gov.cn/cdwqb/c107712/list_ls.shtml">领事认证</a></div>
        <div class="a"><a href="http://cdfao.chengdu.gov.cn/cdwqb/c107703/list_ls.shtml">领事保护</a></div>
        <div class="a"><a href="http://cdjustice.chengdu.gov.cn/">法律服务</a></div>
        <div class="a"><a href="http://171.221.172.90/xxcx/ylqx/index.html">医疗器械企业查询</a></div>
        <div class="a"><a href="http://171.221.172.90/xxcx/yp/index.html">药品基本信息查询</a></div>
        <div class="a"><a href="http://www.12315.cn/">12315维权</a></div>
        <div class="a"><a href="http://cdagri.chengdu.gov.cn/nyxx/c109521/cdnyxx_list.shtml">农业技术推广</a></div>
        <div class="a"><a href="http://cdagri.chengdu.gov.cn/nyxx/c109523/cdnyxx_list.shtml">农情速递</a></div>
        <div class="a"><a href="http://sthj.chengdu.gov.cn/">实时空气质量状况</a></div>
        <div class="a"><a href="http://cdhrss.chengdu.gov.cn/cdrsj/c109774/bsfw_cyjy.shtml">就业查询</a></div>
        <div class="a"><a href="http://cdfao.chengdu.gov.cn/cdwqb/c107726/apec.shtml">APEC商务旅行卡</a></div>
        <div class="a"><a href="http://cdyb.chengdu.gov.cn/ylbzj/c129021/bs_list_3.shtml">基本医疗保险</a></div>
        <div class="a"><a href="http://www.cddyjy.com/">党员远程教育</a></div>
        <div class="a"><a href="http://www.cdclib.org/">数字图书馆</a></div>
        <div class="a"><a href="http://www.cdaee.com/www/">农村产权交易所</a></div>
        <div class="a"><a href="http://cd.qq.com/zt2013/cdzwwb/">政务微博办事大厅</a></div>
        <div class="a"><a href="http://www.cdcdc.org/front/web/list2nd/no/22">健康知识库</a></div>
        <div class="a"><a href="http://www.cdcdc.org/front/web/list2nd/no/4025">传染病防治</a></div>
        <div class="a"><a href="http://www.cdclib.org/lectures/auditorium.html">公益讲座</a></div>

    </div>

</div>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
<script src="/lib/prism/prism.js"></script>
<script src="/lib/tocbot/tocbot.min.js"></script>
<script src="/lib/qrcode/qrcode.min.js"></script>
<script src="/lib/waypoints/jquery.waypoints.min.js"></script>
<script>
    $('#newblog-container').load(/*/footer/newblog*/"/footer/newblog");
</script>


<script>
    <!--    这个js主要是在手机版点击按钮的时候显示菜单-->
    $('.menu.toggle').click(function (){
        $('.m-item').toggleClass('m-mobile-hide');
    });
    $('.ui.dropdown').dropdown({
        on: 'hover'
    });

    //消息提示关闭初始化
    $('.message .close')
        .on('click', function () {
            $(this)
                .closest('.message')
                .transition('fade');
        });
</script>
</body>
</html>
